<template>
  <div>
    <Nav/>
    <Container/>
    <Recommend/>
    <Rank/>
    <Like/>
    <Floor v-for="floor in floorList" :key="floor.id" :floor="floor" />
    <Brand/>
  </div>
</template>

<script>
import Container from "./components/Container"
import Recommend from "./components/Recommend"
import Rank from "./components/Rank"
import Like from "./components/Like"
import Floor from "./components/Floor"
import Brand from "./components/Brand"
import {reqFloorList} from "@/api/home"
export default {
    name:"Home",
    components:{
      Container,
      Recommend,
      Rank,
      Like,
      Floor,
      Brand,
    },
    data(){
      return{
        floorList:[]
      }
    },
    mounted(){
      this.getFloorList()
    },
    methods:{
      async getFloorList(){
        const result = await reqFloorList()
        this.floorList = result
        console.log('floorList',this.floorList);
      }
    }
}
</script>

<style>

</style>